<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>document.readyState</title>
	</head>
	<body>
		<script>
			console.log('文档加载状态：', document.readyState) // 文档加载状态： loading

			// 状态改变时打印它
			document.addEventListener('readystatechange', function (e) {
				console.log(document.readyState) // interactive complete
			})
		</script>
	</body>
</html>
